package com.ryskoo.common.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 客户系统 静态常量表
 * @author huanghe
 *
 */
public class CustomerParamConstant {

	/** 会员体系默认密码 */
	public static final String PASSWORD = "rsy111111";
	
	/**
	 * 会员管理 - 账号状态 MAP
	 */
	private static Map<String,String> customerActiveStateMap = new HashMap<String,String>();
	/** 账号状态 : 1 激活   2 冻结 */
    public static final String ACTIVE_STATE_NORMAL = "1";
    public static final String ACTIVE_STATE_FREEZE = "2";
    
    /**
	 * 会员管理 - 注册来源 MAP
	 */
	private static Map<String,String> customerSourceMap = new HashMap<String,String>();
	/** 注册来源：1.电脑端  2.手机浏览器  3.移动APP应用  4.小程序注册  5.后台添加 */
    public static final String SOURCE_PC = "1";
    public static final String SOURCE_H5 = "2";
    public static final String SOURCE_APP = "3";
    public static final String SOURCE_SP = "4";
    public static final String SOURCE_PLAT = "5";
    
    /**
	 * 会员管理 - 性别 MAP
	 */
	private static Map<String,String> customerSexMap = new HashMap<String,String>();
	/** 会员性别： 1.男  2.女  3.保密 */
    public static final String SEX_MAN = "1";
    public static final String SEX_WOMAN = "2";
    public static final String SEX_SECRET = "3";
    
    /**
	 * 商户管理 - 商户类型 MAP
	 */
	private static Map<String,String> vendorTypeMap = new HashMap<String,String>();
	/** 商户类型： 1.供应商  2.自营商户  3.第三方商户 */
    public static final String VENDOR_TYPE_SUPPLIER = "1";
    public static final String VENDOR_TYPE_SELF = "2";
    public static final String VENDOR_TYPE_THIRD = "3";
    
    /**
	 * 商户管理 - 销售模式 MAP
	 */
	private static Map<String,String> vendorPatternMap = new HashMap<String,String>();
	/** 销售模式： 1.采销  2.代销 */
    public static final String VENDOR_PATTERN_PURCHASE = "1";
    public static final String VENDOR_PATTERN_AGENT = "2";

    /**
     * 商户管理 - 计价方式 MAP
     */
    private static Map<Integer,String> calcTypeMap = new HashMap<>();
    /**计价方式：1.按件数 2.按重量*/
    public static final int CALC_TYPE_ITEM = 1;
    public static final int CALC_TYPE_WEIGHT = 2;

    
    static {
    	customerActiveStateMap.put(ACTIVE_STATE_NORMAL, "激活");
    	customerActiveStateMap.put(ACTIVE_STATE_FREEZE, "冻结");
    	
    	customerSourceMap.put(SOURCE_PC, "电脑端");
    	customerSourceMap.put(SOURCE_H5, "手机浏览器");
    	customerSourceMap.put(SOURCE_APP, "移动APP");
    	customerSourceMap.put(SOURCE_SP, "微信小程序");
    	customerSourceMap.put(SOURCE_PLAT, "后台添加");
    	
    	customerSexMap.put(SEX_MAN, "男");
    	customerSexMap.put(SEX_WOMAN, "女");
    	customerSexMap.put(SEX_SECRET, "保密");
    	
    	vendorTypeMap.put(VENDOR_TYPE_SUPPLIER, "供应商");
    	vendorTypeMap.put(VENDOR_TYPE_SELF, "自营商户");
    	vendorTypeMap.put(VENDOR_TYPE_THIRD, "第三方商户");
    	
    	vendorPatternMap.put(VENDOR_PATTERN_PURCHASE, "采销");
    	vendorPatternMap.put(VENDOR_PATTERN_AGENT, "代销");

        calcTypeMap.put(CALC_TYPE_ITEM, "按件数");
        calcTypeMap.put(CALC_TYPE_WEIGHT, "按重量(kg)");
    }
    
    public static Map<String, String> getCustomerActiveStateMap() {
        return customerActiveStateMap;
    }
    
    public static String getActiveStateNameByKey(String key) {
        return customerActiveStateMap.get(key);
    }
    
    public static Map<String, String> getCustomerSourceMap() {
        return customerSourceMap;
    }
    
    public static String getSourceNameByKey(String key) {
        return customerSourceMap.get(key);
    }
    
    public static Map<String, String> getCustomerSexMap() {
        return customerSexMap;
    }
    
    public static String getSexNameByKey(String key) {
        return customerSexMap.get(key);
    }
    
    public static Map<String, String> getVendorTypeMap() {
        return vendorTypeMap;
    }
    
    public static String getVendorTypeNameByKey(String key) {
        return vendorTypeMap.get(key);
    }
    
    public static Map<String, String> getVendorPatternMap() {
        return vendorPatternMap;
    }
    
    public static String getVendorPatternNameByKey(String key) {
        return vendorPatternMap.get(key);
    }

    public static Map<Integer, String> getCalcTypeMap() {
        return calcTypeMap;
    }

    public static void setCalcTypeMap(Map<Integer, String> calcTypeMap) {
        CustomerParamConstant.calcTypeMap = calcTypeMap;
    }
}
